/**
 * 头部导航 create to by doujiabao - 20191210
 */

import React, { Component } from 'react'

import styles from './index.module.styl'
import routesMap from '@/router/routesMap'

import MaxComponent from '@/components/MaxComponent'
import MinComponent from '@/components/MinComponent'
import { Input } from 'antd'

const { Search } = Input

class Header extends Component {

    goHome = () => {
        window.location.href = window.location.origin + '/#' + routesMap.home
    }

    render() {
        return (<MaxComponent style={{ background: '#fff' }}>

            <MinComponent>

                <div className={styles.header}>

                    {/*logo*/}
                    <img src="https://y.gtimg.cn/mediastyle/yqq/img/logo.png" alt="logo" className={styles.logo} onClick={this.goHome} />

                    <Search
                        placeholder='搜索音乐'
                        style={{ width: 200 }}
                    />

                </div>

            </MinComponent>

        </MaxComponent>)
    }

}

export default Header